#ifndef SAMPLEDB_H_
#define SAMPLEDB_H_

#pragma once

#include <db_cxx.h>
#include <string>

class CSampleDB
{
public:
	CSampleDB(std::string path, std::string name, int accflag);
	~CSampleDB() { CloseDB(); }

	inline Db& GetDB() { return m_db; }

	void WriteDB(int num);
	void ReadDB(int num);
private:
	Db	m_db;
	std::string m_dbfile;
	int accessmethod;

	CSampleDB() : m_db(NULL, 0) { }
	void CloseDB();
};

#endif